#include "graphics/pixels.h"


namespace Jin {

	PixelBufferUPtr CreatePixelBuffer(PixelFormat pixelFormat) noexcept {
		switch (pixelFormat) {
		case SDL_PIXELFORMAT_ABGR8888:
			return std::make_unique<ABGR32Buffer>();
		case SDL_PIXELFORMAT_ARGB8888:
			return std::make_unique<ARGB32Buffer>();
		case SDL_PIXELFORMAT_RGBA8888:
			return std::make_unique<RGBA32Buffer>();
		case SDL_PIXELFORMAT_BGRA8888:
			return std::make_unique<BGRA32Buffer>();
		default:
			break;
		}
		return {};
	}
}